package service.impl;

import dao.Violation_recordDao;
import dao.impl.Violation_recordDaoimpl;
import entity.Violation_record;
import service.Violation_recordService;

import javax.naming.NamingException;
import java.sql.SQLException;
import java.util.Collections;
import java.util.List;

 public class Violation_recordServiceimpl implements Violation_recordService {
    Violation_recordDao dao=new Violation_recordDaoimpl();
    @Override
    public List<Violation_record> Violation_record(Integer searchKey,Integer currentPage,Integer pageSize) throws SQLException, ClassNotFoundException {
        return dao.Violation_record(searchKey,currentPage,pageSize);
    }
     @Override
    public int INSERT(Integer student_id, String student_name, String violation_type, String punishment, String record_time, String auditor, String status) throws SQLException, ClassNotFoundException {
        return dao.INSERT(student_id,student_name, violation_type, punishment, record_time, auditor, status);
    }

     @Override
     public int UPDATE(String id,String violation_type, String punishment, String record_time, String auditor, String status) throws SQLException, ClassNotFoundException {
         return dao.UPDATE(id, violation_type, punishment, record_time, auditor, status);
     }

     @Override
     public int select(String name) throws SQLException, ClassNotFoundException {
         return dao.select(name);
     }

     @Override
     public int delete(int id) throws SQLException, NamingException, ClassNotFoundException {
         return dao.delete(id);
     }

     @Override
     public int getTotalCount(String username) throws SQLException, NamingException, ClassNotFoundException {
         return dao.getTotalCount(username);
     }

 }
